package net.lzzy.practices.web.models;

import lombok.Getter;
import lombok.Setter;
import net.lzzy.practices.entities.Applicant;

import java.util.Date;
import java.util.UUID;

/**
 * @author admin
 */
@Getter
@Setter
public class VmApplicant {
    private final UUID id;
    private final  int status;
    private final Date applyTime;
    private final UUID courseId;
    private final String name;
    private  final String cover;
    private final String desc;
    private final Date createTime;
    private final Date updateTime;
    private final  String teacherName;
    private final  String teacherAvatar;
    private final String studentName;
    private final String studentAvatar;

    public VmApplicant(Applicant applicant) {
        id=applicant.getId();
        status=applicant.getStatus();
        applyTime=applicant.getApplyTime();
        courseId=applicant.getCourse().getId();
        name=applicant.getCourse().getName();
        cover=applicant.getCourse().getCover();
        desc=applicant.getCourse().getDescription();
        createTime=applicant.getCourse().getCreateTime();
        updateTime =applicant.getCourse().getCreateTime();
        teacherName=applicant.getCourse().getTeacher().getNickName();
        teacherAvatar=applicant.getCourse().getTeacher().getAvatar();
        studentName=applicant.getStudent().getNickName();
        studentAvatar=applicant.getStudent().getAvatar();
    }
}
